
<div class="portlet box blue-madison" ng-controller='attend_record_controller'>
	
    <div class="portlet-title">
        <div class="caption">
            <i class="fa fa-exchange"></i>Attendance recording list
        </div>
		<!-----------------------工具箱------------------------------------->
        <div class='toolbox'>
	        <span class="fa fa-minus toolbtn" aria-hidden="true" ng-show='add_new' ng-click='add_new=false'></span>
	        <span class="fa fa-plus toolbtn" aria-hidden="true" ng-show='!add_new' ng-click='add_new=true'></span>
	        <span get-excel 
	        	title="export content as excel" 
	        	data='records' 
	        	heads='heads' 
	        	url='/attendance/getexcel/' 
	        	class="fa fa-sort-amount-desc toolbtn">
	        </span>
	        <span  class="fa fa-save toolbtn" aria-hidden="true" ng-click='update_to_server()'></span>

        </div>
        
    </div>
    <div class="portlet-body" >
	    <!--------------------上传文件窗口，平常隐藏的--------------------->
	    <div class="upload" ng-show='add_new'>
			<div class="fl-wrap btn" 
				ng-class='{"btn-danger":!myfile.name,"btn-success":myfile.name}'>
				<span file-loader 
					self='myfile' 
					class="hidden-input" 
					accept='.xls'>
				</span>
				<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
				<span ng-hide='myfile.name'>选择考勤记录xls文件</span>
				<span ng-bind='myfile.name'></span>
		 	</div>
			<div class='btn btn-primary' 
				ng-click='upload_record(myfile)' 
				ng-disabled='!myfile.name||myfile.uploading'>上传</div>
			<span class='fa fa-spinner fa-spin' ng-show='myfile.uploading'></span>
		</div>
		
	    <!------------------------- 过滤框--------------------------------->
      <div ng-include='"filter_box.html"'onload='search=search;fb=fb'></div>
        <!-------------------------表格开始--------------------------------->
        <table class="table table-striped table-bordered table-hover">
            <thead>
	            <tr>
		            <th ng-repeat='field in heads' >
			            <span ng-bind='field.label'></span>
			            <span ng-if='field.filter'>
				            <span head-filter 
				            	items='org_records' 
				            	name='[[field.name]]' 
				            	self='field._filter'>
					            <span class="glyphicon glyphicon-filter" aria-hidden="true"></span>
					          </span>
			            </span>
			            <span sort-mark name='field.name' items='records'></span>
		            </th>

	            </tr>
	   
            </thead>
            <tbody>
	            <tr ng-repeat='record in records | offset: currentPage*itemsPerPage | limitTo: itemsPerPage'>
		            <td ng-bind='record.empid'></td>
		            <td ng-bind='record.name'></td>
		            <td ng-bind='record.date'></td>
		            <td ng-bind='record.enter_time'></td>
		            <td ng-bind='record.leave_time'></td>
		            <td ng-bind='record.late'></td>
		            <td ng-bind='record.late_team'></td>
		            <td ng-bind='record.late_person'></td>
		            <td ng-bind='record.workspan'></td>
		            <td ng-bind='record.overtime'></td>
		            <td ng-bind='record.absent'></td>
		            <!--<td ng-bind='record[field]' ng-repeat='field in heads.order'></td>-->
	            </tr>
            </tbody>
            
        </table>
        <div page-foot per='itemsPerPage' crt='currentPage' items='records' style='text-align: right;'> 
		</div>
    </div>
</div>




